com.highdeal.pnr.hci
Class TransactionClearingException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.highdeal.hci.OperationFailureException
              extended by com.highdeal.pnr.hci.TransactionClearingException
All Implemented Interfaces:
OperationResult, XMLMarshallable, java.io.Serializable

public class TransactionClearingException
extends OperationFailureException

Exception thrown when an error occurs during the clearing of a business transaction.

Important Note

In an offline charging scenario, the SAP CC system may include this HCI exception in the BatchChargeException or RerateSubscriptionException as the cause.

Reasons

The following typical errors are possible:

Failure Reason Code (Java) Reason Code (XML) Next Steps
Invalid transaction set 1 (INVALID_TRANSACTION_SET) invalidTransactionSet See the note
Bad configuration 2 badConfiguration
Unable to reclear 10 unableToReclear
Cannot calculate tax 11 cannotCalculateTax

Note

Many reasons are deprecated and revoked. They are not in the table above.

Note

See the Field Detail section for more information about troubleshooting operations to solve the problem.

Exception and Error Handling

Depending on your business requirements, design and develop the handling functions in your client application.

See Also:
ChargedTransactionSet, Serialized Form

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="transactionClearingFault">
   <xs:complexType>
    <xs:attribute name="error" type="TransactionClearingFaultErrorType"/>
    <xs:attribute name="message" type="xs:string"/>
   </xs:complexType>
  </xs:element>

 <xs:simpleType name="TransactionClearingFaultErrorType">
   <xs:restriction base="xs:string">
      <xs:enumeration value="databaseFailure"/>  <!-- d e p r e c a t e d -->
      <xs:enumeration value="invalidTransactionSet"/>
      <xs:enumeration value="badConfiguration"/>
      <xs:enumeration value="invalidAccountCurrency"/>  <!-- d e p r e c a t e d -->
      <xs:enumeration value="accountLocked"/>  <!-- d e p r e c a t e d -->
      <xs:enumeration value="accountClosed"/>  <!-- d e p r e c a t e d -->
      <xs:enumeration value="cannotCreateAccount"/>  <!-- d e p r e c a t e d -->
      <xs:enumeration value="accountDoesntExist"/>  <!-- d e p r e c a t e d -->
      <xs:enumeration value="cannotChargePrepaidAccount"/>  <!-- d e p r e c a t e d -->
      <xs:enumeration value="invoicingForbidden"/>  <!-- d e p r e c a t e d -->
      <xs:enumeration value="unableToReclear"/>
      <xs:enumeration value="cannotCalculateTax"/>
      <xs:enumeration value="invalidReservationSessionID"/>  <!-- d e p r e c a t e d -->
   </xs:restriction>
 </xs:simpleType>


Field Summary
static int ACCOUNT_CLOSED
          Deprecated. Not used anymore
static int ACCOUNT_DOESNT_EXIST
          Deprecated. This reason code is deprecated and can no longer be returned by the SAP CC system.
static int ACCOUNT_LOCKED
          Deprecated. Not used anymore
static int BAD_CONFIGURATION
          2: Constant error for a bad configuration.
static int CANNOT_CALCULATE_TAX
          11: Unable to calculate tax; an invalid tax is identified by the charged item framework implementation.
static int CANNOT_CHARGE_PREPAID_ACCOUNT
          Deprecated. Not used anymore
static int CANNOT_CREATE_ACCOUNT
          Deprecated. Not used anymore
static int CANNOT_STORE_TAX
          17: Unable to calculate tax
static int CIF_EXCEPTION
          16: Unable to communicate with one charge instance
static int DATABASE_FAILURE
          Deprecated. This reason code is deprecated and can no longer be returned by the SAP CC system
static int INTERNAL_ERROR
          -1: Other internal reasons
static int INVALID_ACCOUNT_CURRENCY
          Deprecated. Not used anymore
static int INVALID_CHARGED_ITEM_CLASS
          15: Charged item class is invalid
static int INVALID_CHARGED_ITEM_MAPPING
          Deprecated. Not used anymore
static int INVALID_REFILL_RECORD_CLASS
          18: Refill record class is invalid
static int INVALID_RESERVATION_SESSION_ID
          Deprecated. Not used anymore
static int INVALID_TRANSACTION_SET
          1: Constant error when clearing an invalid transaction set.
static int INVOICING_FORBIDDEN
          Deprecated. Not used anymore
static int UNABLE_TO_RECLEAR
          10: Constant error when reclearing is unable; This error occurs when the rerating process is not supported by the charged item framework implementation.
 
Constructor Summary
TransactionClearingException()
          Constructs an empty exception.
TransactionClearingException(int error, java.lang.String message)
          Constructs an exception with an error code and a message; The message contains a human readable text.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 int getError()
          Returns the numercial reason code why the clearing of a charged transaction set failed.
 java.lang.String getMessage()
          Returns the comprehensive message explaining why the clearing of a charged transaction set failed.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 
Methods inherited from class com.highdeal.hci.OperationFailureException
getOperandReference
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATABASE_FAILURE

@Deprecated
public static final int DATABASE_FAILURE
Deprecated. This reason code is deprecated and can no longer be returned by the SAP CC system
0: Constant error for a database failure.

See Also:
Constant Field Values

INVALID_TRANSACTION_SET

public static final int INVALID_TRANSACTION_SET
1: Constant error when clearing an invalid transaction set.

See Also:
Constant Field Values

BAD_CONFIGURATION

public static final int BAD_CONFIGURATION
2: Constant error for a bad configuration.
Next Steps

Verify the related error message and fix the charge item framework configuration accordingly.

See Also:
Constant Field Values

INVALID_ACCOUNT_CURRENCY

@Deprecated
public static final int INVALID_ACCOUNT_CURRENCY
Deprecated. Not used anymore
3: Constant error for an invalid account currency.

See Also:
Constant Field Values

ACCOUNT_LOCKED

@Deprecated
public static final int ACCOUNT_LOCKED
Deprecated. Not used anymore
4: Constant error when an account is locked.

See Also:
Constant Field Values

ACCOUNT_CLOSED

@Deprecated
public static final int ACCOUNT_CLOSED
Deprecated. Not used anymore
5: Constant error when an account is closed.

See Also:
Constant Field Values

CANNOT_CREATE_ACCOUNT

@Deprecated
public static final int CANNOT_CREATE_ACCOUNT
Deprecated. Not used anymore
6: Constant error when an account cannot be created

See Also:
Constant Field Values

ACCOUNT_DOESNT_EXIST

public static final int ACCOUNT_DOESNT_EXIST
Deprecated. This reason code is deprecated and can no longer be returned by the SAP CC system.
7: Constant error when an account does not exist

See Also:
Constant Field Values

CANNOT_CHARGE_PREPAID_ACCOUNT

@Deprecated
public static final int CANNOT_CHARGE_PREPAID_ACCOUNT
Deprecated. Not used anymore
8: Constant error when clearing into a prepaid account is impossible

See Also:
Constant Field Values

INVOICING_FORBIDDEN

@Deprecated
public static final int INVOICING_FORBIDDEN
Deprecated. Not used anymore
9: Constant error when reinvoicing is not allowed

See Also:
Constant Field Values

UNABLE_TO_RECLEAR

public static final int UNABLE_TO_RECLEAR
10: Constant error when reclearing is unable; This error occurs when the rerating process is not supported by the charged item framework implementation.

See Also:
Constant Field Values

CANNOT_CALCULATE_TAX

public static final int CANNOT_CALCULATE_TAX
11: Unable to calculate tax; an invalid tax is identified by the charged item framework implementation.
Next Steps

Verify the related error message and fix the tax computation system accordingly

See Also:
Constant Field Values

INVALID_RESERVATION_SESSION_ID

@Deprecated
public static final int INVALID_RESERVATION_SESSION_ID
Deprecated. Not used anymore
12: Constant error when trying to confirm a reservation with a bad session ID

See Also:
Constant Field Values

INVALID_CHARGED_ITEM_MAPPING

@Deprecated
public static final int INVALID_CHARGED_ITEM_MAPPING
Deprecated. Not used anymore
14: Charged item mapping is invalid

See Also:
Constant Field Values

INVALID_CHARGED_ITEM_CLASS

public static final int INVALID_CHARGED_ITEM_CLASS
15: Charged item class is invalid

See Also:
Constant Field Values

CIF_EXCEPTION

public static final int CIF_EXCEPTION
16: Unable to communicate with one charge instance

See Also:
Constant Field Values

CANNOT_STORE_TAX

public static final int CANNOT_STORE_TAX
17: Unable to calculate tax

See Also:
Constant Field Values

INVALID_REFILL_RECORD_CLASS

public static final int INVALID_REFILL_RECORD_CLASS
18: Refill record class is invalid

See Also:
Constant Field Values

INTERNAL_ERROR

public static final int INTERNAL_ERROR
-1: Other internal reasons

See Also:
Constant Field Values
Constructor Detail

TransactionClearingException

public TransactionClearingException()
Constructs an empty exception.


TransactionClearingException

public TransactionClearingException(int error,
                                    java.lang.String message)
Constructs an exception with an error code and a message; The message contains a human readable text.

Parameters:
message - The message
error - The error
Method Detail

getError

public int getError()
Returns the numercial reason code why the clearing of a charged transaction set failed.

Returns:
The error code
See Also:
DATABASE_FAILURE, INVALID_TRANSACTION_SET, BAD_CONFIGURATION, INVALID_ACCOUNT_CURRENCY, ACCOUNT_LOCKED, ACCOUNT_CLOSED, CANNOT_CREATE_ACCOUNT, ACCOUNT_DOESNT_EXIST, CANNOT_CHARGE_PREPAID_ACCOUNT, INVOICING_FORBIDDEN, UNABLE_TO_RECLEAR, CANNOT_CALCULATE_TAX, INVALID_RESERVATION_SESSION_ID

getMessage

public java.lang.String getMessage()
Returns the comprehensive message explaining why the clearing of a charged transaction set failed.

Overrides:
getMessage in class java.lang.Throwable
Returns:
The detailed message

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Parameters:
atts - The XML attributes of the current element

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)